package com.destin.basic.template;

import com.destin.basic.eneity.Attachment;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * @description: 统一的文件template接口
 * @author destin
 * @date 2020/12/28 11:16
 **/
public interface FileTemplate {


    /**
     * @description: 上传文件
     **/
    Map<String, String> uploadFile(MultipartFile file) throws Exception;

    /**
     * @description:  下载文件
     **/
    void download(String type, Attachment attachment, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * @description:  删除文件
     **/
    void removeObject(Attachment attachment);

}
